package com.navinfo.opentsp.qingqi.trackoptimize.common.result;

/**
 * 通用Http code 封装
 *
 * @author chenjc
 * @date 2016-03-02
 * @modify
 * @copyright Navi Tsp
 */
public enum ReturnCode implements InterfaceResultCode {

    IMPORT_DATA_ERR(1204, "有错误数据!"),
    OK(200, "OK"),
    NO_DATA(511, "NO DATA"),
    CLIENT_ERROR(507, "Client Error"),
    FORBIDDEN(510, "Forbidden"),
    SERVER_ERROR(506, "Server Error"),
    LOGIN_FAIL(509, "登录失败！"),
    USER_DNE(508, "User Does Not Exist"),
    SCAN_ERROR(512, "当前车辆状态无需您进行扫码操作"),
    QUALITY_CONTROL_REJECTED(513,"质检驳回"),
    WAREHOUSING_CONFIRMATION_TIMEOUT(514,"你的操作已超出时限要求,请等待上一环节重新提交！"),
    WAREHOUSING_CONFIRMATION_OUT_RANGE(515,"您的操作地点与上一环节的地点差距过大,请确认后重试！"),
    OUTBOUND_CONFIRMATION_TIMEOUT(516,"你的操作已超出时限要求,请等待上一环节重新提交！"),
    OUTBOUND_CONFIRM_OUT_RANGE(517,"您的操作地点与上一环节的地点差距过大，请确认后重试！"),
    DELIVERY_CONFIRMATION_TIMEOUT(518,"你的操作已超出时限要求,请等待上一环节重新提交！"),
    DELIVERY_CONFIRMATION_OUT_RANGE(519,"您的操作地点与上一环节的地点差距过大，请确认后重试！"),
    NOT_FIND_VIN_ERROR(520,"系统中未发现您输入的VIN号对应的车辆,请重新输入！"),
    COMMIT_ERROR(521,"提交失败,当前流程环节无需您进行操作！"),
    CONFIRM_OUT_RANGE(522,"您扫描的车辆与您当前位置超过距离！"),
    NOT_FIND_CAR_ERROR(523,"没有此车辆信息"),
    NOT_AUTH_CAR_ERROR(524,"您无权查看权限范围外的车辆"),
    NOT_SLER_CAR_ERROR(525,"您无权查看其他经销商的车辆"),
    SOLED_CAR_ERROR(526,"您无权查看已销售的车辆"),
    NO_PROCESS_ERROR(527,"您扫码的车辆无需在产销流程流转"),
    OUTBOUND_ERROR(528,"您的操作地点与车辆所在位置差距过大！"),
    APPTEL_CHECK(529,"您填写的司机APP注册手机号还未注册APP，确定要保存这个手机号吗？"),
    EMAIL_SEND(530,"信息数据量过大，请选择邮箱发送！"),
    EXSITS_WOCODE(531,"当前车辆在该服务站已有进行中工单"),
    IS_EXCEPTION(532,"该车辆在XXX时间进入过该服务站，停留时间XX分，已标识为异常工单。继续创建工单？"),
    IS_NEW_CAR(533,"扫码目标为新车辆，是否切换为新车辆，按确定继续，按重试进行重新扫码？"),
    IS_ONE_CAR(534,"您操作的为同一台车！"),
    IS_ANOTHER_CAR(535,"两次扫码对应的车辆不一致！"),
    NO_TBOX(536,"未安装TBox"),
    APPLY_RECEIVE_CAR(537,"需申请接车"),
    APPLY_RECEIVE_CAR_INFO(538,"跳转申请接车详情"),
    APPLY_RECEIVE_WOCODE_INFO(539,"数据状态已变更，请重试！"),
    SMS_VERIFICATION(540,"需短信校验"),
    RESET_PASSWORD(541,"需重置密码"),
    TDS_BUSINESS_FAILTURE(601,"TDS服务器处理失败"),
    TDS_ERROR(602,"TDS服务器内部错误"),
    DATA_ERROR(603,"数据异常（轻/重卡制造公司数据缺失）"),
    NO_SUCH_TRUCK_DATA(604,"制造公司不正确"),
    OUT_STORE_IS_NULL(607,"空出"),
    NO_USERID(555,"无法获取到用户信息，请重试！"),
    DATA_Exception(605,"数据异常！"),
    TDS_DUPLICATE_IN(606,"您的车辆已入库，请勿重复入库！"),
    DISTANCE_OUT_WARNING(607,"电子标签系统盘点成功！系统匹配到的扫码枪位置距离车辆位置过大，可联系管理人员获得相关信息。"),
    NOT_INSPECTOR(608,"系统未匹配到质检员！"),
    NOT_DRIVER(609,"系统未匹配到倒车司机！"),
    NOT_HANDLE_DRIVER(610,"系统未匹配到经手司机！"),
    NO_THEN_UPD(611,"电子标签库中有相关数据！"),
    NO_THEN_ADD(612,"电子标签库中没有相关数据！"),
    CHECK_STORE_CNT(613,"今日已成功盘点两次，无需再重复盘点！"),
    CHECK_UPD_TIME(614,"车辆的末次位置时间超过60分钟，请在车辆点火后重试！"),
    FALLBACK(615,"服务器暂忙，请稍后重试！"),
    CHECK_CAR_ATYPISM(616,"盘点网点必须与收车网点一致！"),
    IMAGE_CNT_ERROR(617, "图片数量不正确"),
    /**
     * used in cases when data was concurrently modified, for example when version value of passed data
     * differ from version value of stored data.
     */
    VERSION_OLD(700,"版本太旧，请更新新版本"),
    CONFLICT(409, "Conflict"),
    TIMEOUT(408, "请求超时"),
    BIND_PHONE(201, "登录成功，请绑定手机号"),
    NAME_LOGIN_FAIL(1018, "多次登录失败，需要输入验证码!"),
    REPEAT_OPERATE_FAIL(1205, "请勿多次重复操作!"),
    NAME_LOGIN_KAPTCHAFAIL(1012, "验证码错误!"),
    REDIS_LOCKED_ING(1101, "服务锁定中!"),
    CAL_ING(1201, "程序正在努力计算中!");

    private final int code;

    private String message;

    ReturnCode(int code) {
        this.code = code;
    }

    ReturnCode(final int code, final String message) {
        this.code = code;
        this.message = message;
    }

    public int code() {
        return code;
    }

    public String message() {
        return message;
    }


}
